package algorithm1_v3;

import java.net.InetAddress;
import java.util.concurrent.Callable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Task3 implements Callable<String>{

	static Logger logger= LoggerFactory.getLogger(Task3.class);
	
	@Override
	public String call() throws Exception {
		SystemInfo info = SystemInfo.INSTANCE;
		String myProcess=InetAddress.getLocalHost().getHostName();
		info.timeout.put(info.leader.toString(),info.timeout.get(info.leader.toString())+1);
		logger.info("Leader zarra"+info.leader.toString());
		info.leader.replace(0, info.leader.length(), myProcess);
		logger.info("Leader berria"+info.leader.toString());
		return null;
	}

}
